import { HttpStatusCodeEnum } from '../enums/http-status-code.enum';

export const HttpStatusMessages: Record<HttpStatusCodeEnum, string> = {
  [HttpStatusCodeEnum.OK]: '请求成功',
  [HttpStatusCodeEnum.CREATED]: '资源创建成功',
  [HttpStatusCodeEnum.ACCEPTED]: '请求已接受，但未处理',
  [HttpStatusCodeEnum.NO_CONTENT]: '请求成功，但没有内容返回',
  [HttpStatusCodeEnum.MOVED_PERMANENTLY]: '资源永久移动',
  [HttpStatusCodeEnum.FOUND]: '资源临时移动',
  [HttpStatusCodeEnum.SEE_OTHER]: '请参见其他地址',
  [HttpStatusCodeEnum.NOT_MODIFIED]: '资源未修改',
  [HttpStatusCodeEnum.USE_PROXY]: '需要使用代理访问',
  [HttpStatusCodeEnum.TEMPORARY_REDIRECT]: '临时重定向',
  [HttpStatusCodeEnum.PERMANENT_REDIRECT]: '永久重定向',
  [HttpStatusCodeEnum.BAD_REQUEST]: '错误的请求，请检查输入数据',
  [HttpStatusCodeEnum.UNAUTHORIZED]: '未经授权，用户身份验证失败',
  [HttpStatusCodeEnum.FORBIDDEN]: '禁止访问',
  [HttpStatusCodeEnum.NOT_FOUND]: '未找到请求的资源',
  [HttpStatusCodeEnum.METHOD_NOT_ALLOWED]: '不允许的请求方法',
  [HttpStatusCodeEnum.NOT_ACCEPTABLE]: '请求无法接受',
  [HttpStatusCodeEnum.PROXY_AUTHENTICATION_REQUIRED]: '代理身份验证失败',
  [HttpStatusCodeEnum.REQUEST_TIMEOUT]: '请求超时',
  [HttpStatusCodeEnum.CONFLICT]: '请求冲突',
  [HttpStatusCodeEnum.GONE]: '资源已删除',
  [HttpStatusCodeEnum.LENGTH_REQUIRED]: '需要指定 Content-Length',
  [HttpStatusCodeEnum.PRECONDITION_FAILED]: '前提条件失败',
  [HttpStatusCodeEnum.PAYLOAD_TOO_LARGE]: '请求体过大',
  [HttpStatusCodeEnum.URI_TOO_LONG]: '请求 URI 太长',
  [HttpStatusCodeEnum.UNSUPPORTED_MEDIA_TYPE]: '不支持的媒体类型',
  [HttpStatusCodeEnum.RANGE_NOT_SATISFIABLE]: '请求范围无法满足',
  [HttpStatusCodeEnum.EXPECTATION_FAILED]: '预期失败',
  [HttpStatusCodeEnum.IM_A_TEAPOT]: '我是一个茶壶 (愚人节彩蛋)',
  [HttpStatusCodeEnum.MISDIRECTED_REQUEST]: '请求被错误定向',
  [HttpStatusCodeEnum.UNPROCESSABLE_ENTITY]: '无法处理的实体',
  [HttpStatusCodeEnum.LOCKED]: '资源已锁定',
  [HttpStatusCodeEnum.FAILED_DEPENDENCY]: '依赖失败',
  [HttpStatusCodeEnum.TOO_EARLY]: '请求过早',
  [HttpStatusCodeEnum.UPGRADE_REQUIRED]: '需要升级协议',
  [HttpStatusCodeEnum.PRECONDITION_REQUIRED]: '请求需要满足前提条件',
  [HttpStatusCodeEnum.TOO_MANY_REQUESTS]: '请求过多',
  [HttpStatusCodeEnum.REQUEST_HEADER_FIELDS_TOO_LARGE]: '请求头字段过大',
  [HttpStatusCodeEnum.UNAVAILABLE_FOR_LEGAL_REASONS]: '由于法律原因不可用',
  [HttpStatusCodeEnum.INTERNAL_SERVER_ERROR]: '服务器内部错误',
  [HttpStatusCodeEnum.NOT_IMPLEMENTED]: '未实现',
  [HttpStatusCodeEnum.BAD_GATEWAY]: '错误的网关',
  [HttpStatusCodeEnum.SERVICE_UNAVAILABLE]: '服务不可用',
  [HttpStatusCodeEnum.GATEWAY_TIMEOUT]: '网关超时',
  [HttpStatusCodeEnum.HTTP_VERSION_NOT_SUPPORTED]: '不支持的 HTTP 版本',
  [HttpStatusCodeEnum.VARIANT_ALSO_NEGOTIATES]: '变体协商失败',
  [HttpStatusCodeEnum.INSUFFICIENT_STORAGE]: '存储空间不足',
  [HttpStatusCodeEnum.LOOP_DETECTED]: '检测到无限循环',
  [HttpStatusCodeEnum.NOT_EXTENDED]: '未扩展',
  [HttpStatusCodeEnum.NETWORK_AUTHENTICATION_REQUIRED]: '需要网络身份验证',
  [HttpStatusCodeEnum.DATABASE_ERROR]: '数据库错误',
  [HttpStatusCodeEnum.CONFIGURATION_ERROR]: '配置错误',
  [HttpStatusCodeEnum.AUTH_REQUIRED]: '需要认证（例如：未付费或未授权）',
  [HttpStatusCodeEnum.FOREIGN_KEY_ERROR]: '尝试删除被引用的外键',
  [HttpStatusCodeEnum.VALID_ERROR]: '字段验证异常',
};
